namespace Admin2025.Domain.Entities;

/// <summary>
/// 实体基类，包含所有实体通用的属性。
/// </summary>
public abstract class EntityBase
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public Guid Id { get; set; }

    /// <summary>
    /// 业务编码（如编号、唯一标识等）
    /// </summary>
    public string? Code { get; set; }

    /// <summary>
    /// 是否激活
    /// </summary>
    public bool IsActived { get; set; } = true;

    /// <summary>
    /// 是否已删除
    /// </summary>
    public bool IsDeleted { get; set; } = false;

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    /// <summary>
    /// 创建人ID
    /// </summary>
    public Guid CreatedBy { get; set; } = Guid.Empty;

    /// <summary>
    /// 更新人ID
    /// </summary>
    public Guid UpdatedBy { get; set; } = Guid.Empty;

    /// <summary>
    /// 显示顺序
    /// </summary>
    public int DisplayOrder { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string? Remarks { get; set; }
}